How To Upload Website On Amazon EC2?

413 Views
0 rating based on 0 reviews

Are you having any idea about uploading your website on Amazon EC2? If no then don't worry, I will help you regarding the same thing in this article.

So you can create a website but you don’t know how to upload it online. Don’t worry. You can easily upload your website on Amazon EC2. You can upload it on Amazon EC2 applying two ways: with a Linux Ubuntu server or using Internet Information Services (IIS). Here, we will inform you about both processes. SO follow this article to know about how to upload the website on Amazon EC2.

Upload Website on Amazon EC2

Uploading Website on Amazon EC2 with Linux Ubuntu Server

  1. First, arrange your server. Log in to Amazon AWS and navigate to the AWS Management console. Choose Amazon EC2. Select “Launch Instance”.
    Select Launch Instances
  2. Pick Linux Ubuntu 16,04 LTS as the Amazon Machine Image. Keep all the configurations as defaults. And, launch your instance with a new key pair. Download it and store it securely.
  3. Now, you have to pick up an FTP client for moving the files to the server. Choose FileZilla and configure it. Select “File Manager” and put the server address and the key pair file in it. If you come across any problem, just follow the picture given below.
    Picture to pick an FTP client
  4. Then, you have to find an SSH client for joining the server and alter variables. PuTTY is a good choice as an SSH client.
  5. After linking up with the server, move on to uploading the website. Click on the index and move it to the server employing FileZilla. If it gives an error saying “Access Denied”, then select the “www” file and fix the authorization.
    Upload your website
  6. Now, Install Nginx on your server. When you upload more websites on a single server, it will help people to search for the appropriate website they need. For that, first, join the server with the PuTTY. For installing Nginx, apply these commands one by one:
    Apply these commands
  7. Assemble your website by making a configuration file using this command:
    Use this Command
  8. Afterward, cut and paste the given text:
    Paste this text
  9. Close it after saving. And, move the file to the authorized websites. Finally, relaunch Nginx.
  10. Don’t forget to modify your domain title and folder. For modifying the domain, access “Port 80” from the “Security Groups” at the “EC2 Dashboard”.
    Modify your domain
  11. Then, fix the DNS of your domain. Navigate to the website on which you purchased the domain. Select “manage DNS” and modify it. And, your website uploading is complete.
    Fix the DNS of your domain

Uploading Website on Amazon EC2 using Internet Information Services (IIS)

  1. First, join your EC2 server instance working Remote Desktop Protocol (RDP).
  2. Make certain that the instance has access to the appropriate ports. And, Install IIS. Arrange it according to your need at the instance.
  3. Store your “Public IP” address. Locate it from the “Description” option of your instance, which you can access from the “EC2 Dashboard”.
  4. Now, for arranging the website, go to the “IIS Manager”. Extend “Sites”. Select “Default Web Site”. Then, pick “Explore”. And, select the home page of the “.html” website. Make certain that you have the local entrance permission of the website.
  5. Write down the “Public IP” address in a web browser and validate that you have the external entrance permission of the website.
  6. Select the “Elastic IPs” from the “EC2 Dashboard”. Pick out “Allocate new address” and select “Allocate”. Then, close it by clicking on “Close”. Access the “Actions” option and go for “Associate Address”.
  7. Then, select your “Instance ID” and pick “Associate” from the “Instance” option. Now, you may access your website utilizing an Elastic IP address.
  8. Go to the “Amazon Route 53 console”. Select “Hosted Zones”. Pick your “Domain Name”  and go for “Create Record Set”. Write down your “Public IP” address in the “Value” option. Pick out “Save Record Set”. And, now your website domain name is allowed with the IP in Route 53.

So, that’s how you can upload a website on Amazon EC2 following the above steps.

Summary: How to Upload Website on Amazon EC2?

  • Click on 'Sign In' button and enter your login details.
  • Go to EC2 Dashboard and click on 'Launch Instance' button
  • Here, you will see a huge list of AMIs (Amazon Machine Images).
  • Select the appropriate option and click on 'Next' button.
  • This step is very important, as here you have to select the instance type.
  • Set the configuration details for your instance (upto you) and click on the 'Next'.
  • Add your storage space required for your website. (Minimum 5 GB)
  • Now, create a security group with all privileges enabled to run any program on it. Give it a name too.
  • Review your permissions and then click on Launch. 
  • You have successfully created a new instance on AWS EC2 that can be used to host websites or run other services.